package com.qidian.mes.device.controller;

import com.qidian.common.pojo.MESResult;
import com.qidian.mes.device.service.FixService;
import com.qidian.mes.pojo.Fix;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;

/**
 * @Author 刘泽磊
 * @Company 起点编程
 * @Description
 * @Time 2024/10/24 16:47
 */
@RestController
@RequestMapping("/fix")
@CrossOrigin
public class FixController {
    @Autowired
    private FixService fixService;
    @GetMapping("/list")
    public MESResult select(Fix fix){
        return fixService.select(fix);
    }
    @PostMapping("/insert")
    public MESResult insert(@RequestBody Fix fix){
        return fixService.insert(fix);
    }
    @PutMapping("/update")
    public MESResult update(@RequestBody Fix fix){
        return fixService.update(fix);
    }
    @GetMapping("/selectById")
    public MESResult selectById(Long fixId){
        return fixService.selectById(fixId);
    }
    @DeleteMapping("/delete")
    public MESResult delete(Long fixId){
        return fixService.delete(fixId);
    }
}
